<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <title>二手手机回收｜旧手机回收｜二手手机交易－耶回收</title>
    <meta name="keywords" content="耶回收二手手机回收频道-为您提供二手闲置手机回收、旧手机回收、闲置手机回收业务-权威机构检测，高价上门回收-耶回收官网！"/>
    <meta name="description" content="手机回收,旧手机回收,回收手机,高价回收手机"/> 
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="renderer" content="webkit" />  
    <link href="<%=basePath%>static/css/common_new.min.css" rel="Stylesheet" type="text/css" />
    <link href="/favicon.ico" mce_href="/favicon.ico" rel="bookmark" type="image/x-icon" />
    <link href="/favicon.ico" mce_href="/favicon.ico" rel="icon" type="image/x-icon" />
    <link href="/favicon.ico" mce_href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link id="css" href="<%=basePath%>static/css/search.min.css" rel="stylesheet" type="text/css" />
    <link href="<%=basePath%>static/layer/2.4/skin/layer.css" rel="stylesheet" type="text/css"/>
    <script src="<%=basePath%>js/jquery-1.11.1.js" type="text/javascript"></script>
    <script src="<%=basePath%>js/jquery.validate.js" type="text/javascript"></script>
    <script src="<%=basePath%>static/layer/2.4/layer.js" type="text/javascript"></script>
    <script type="text/javascript" src="<%=basePath%>js/vue.min.js"></script>
	<link rel="stylesheet" href="<%=basePath%>css/index.css" type="text/css">
    <style>
    .daohang{
        width: 1190px;
        height: 50px;
        margin: 10px auto;

    }
    .daohang a{
        color: black;
    }
    .row {
        width: 1190px;
        height: 50px;
        margin: 0 auto;
    }
    .row p{
        font-size: 30px;
        color: #2192c9;
        font-weight: 600;
    }
    .inp1{
        width: 1190px;
        height: 50px;
    }
    .inp1 input{
        /* display: block;
        float: left; */
        width: 240px;
        height: 30px;
        margin-top: 50px;
        font-size:14px;
        border: 1px solid #ddd;
    }
    
     .inp1 input:hover {
      border:1px solid #127cc9;
     
     }
    .text1{
           display: block;
        width: 900px;
        height: 200px;
        margin: 0 auto;
        margin-top: 20px;
        margin-bottom: 80px;
        border: 1px solid #7b7b7b;
    }
    .but{
        display: block !important;
        width: 300px !important;
        height: 40px !important;
        border-radius: 5px !important;
        background: #2192c9 !important;
        border: 0px solid #2192c9 !important;
        margin: 20px auto !important;
        margin-bottom: 80px;
        color:#fff;
        font-size:16px !important;
    }
    .dibu{
        text-align: center;
        margin-top: 780px;
        background: #f9f6f6;
        height: 60px;
        line-height: 30px;
    }
    a{
        color: black;
    }
    .dibuspan p a{
        color: #a8a7a7;
    }
    .dibuspan p span{
        color: #a8a7a7;
    }
    
   .navbar-content{
 border:0px !important;
}
.yeah-top{border:none !important;}
.navbar{height:40px !important;}
    </style>
</head>
<body>  
<div id="header">
    <div class="navbar">
        <div class="navbar-content">
            <jsp:include page="yeah-top.jsp"/>
        </div>
    </div>
  </div>
  

    <div class="daohang">
    <input type="hidden" id="user_a" value="${user.uid}"/>
        <a href="<%=basePath%>" title="手机回收,二手手机回收,耶回收网首页">耶回收</a><span> > </span>
        <a href="#" title="二手回收产品,二手手机回收,回收品牌,回收分类">企业回收</a>
    </div>
    <section>
        <div class="row">
         <form action="epback_sb" onsubmit="return checkinfo()" method="post">

            
            <p>请输入您要回收的物品 <span id="tips"></span></p>

        <textarea rows="8" cols="40" class="text1" name="descripinfo" placeholder="电脑，服务器，手机，空调，路由器，座椅..."></textarea>

        <p>请填写您的基本信息 <span style="color: #2192c9; font-weight: 100;">  提交后我们会在一小时内联系您</span></p>
        <div class="inp1">
            <input id="company" type="text" placeholder="公司名称" oninput="check_null(this)" name="companyname"/>
            <input id="clientname" type="text" placeholder="联系人" style="margin-left: 270px;"  oninput="check_null(this)" name="clientname"/>
            <input id="phone" type="text" placeholder="电话" style="float: right;" oninput="checkphone()" name="phone"/>
            
            <div class="daohang">
    <input type="submit" value="提交" class="but"/>
            </div>
        
            </form>
            <p style="margin-top: 50px;">直接电话咨询</p>
           
                <img src="static/images/kefu.jpg" alt="" style="margin: 20px auto; display: block;">
           
        </div>
        
        </div>
        
    </section>


    <section>
        <div class="dibu">
            <div>
                <p>
                    <a href="javascript:">关于我们</a>
                    <span class="mod_copyright_split">|</span>
                    <a href="javascript:">联系我们</a>
                    <span class="mod_copyright_split">|</span>
                    <a href="javascript:">联系客服</a>
                    <span class="mod_copyright_split">|</span>
                    <a href="javascript:">合作招商</a>
                </p>
                <div class="dibuspan">
                    <p>
                        <a href="javascript:" >沪ICP备17036439号</a>
                        <span>|</span>
                        <span>沪ICP备17036439号-2</span>
                        <span>|</span>
                        <a href="javascript:">上海瓜叶网络科技有限公司</a>
                    </p>
                </div>
            </div>
        </div>
    </section>
    <script type="text/javascript">
    
  
   	      if($("#user_a").val().trim()!=""){
   	      }else{
   	    	  $("#tips").append("提示：企业回收需要您登陆之后才能操作！").css("color","red").css("font-size","16px");
   	    	  $("form").find("textarea").attr("disabled","disabled");
   	    	 $("form").find("input").each(function(){
   	    		 $(this).attr("disabled","disabled");
   	    	 });
   	    	setTimeout(function(){layer.confirm('企业回收需要您登陆', {
   	    	  btn: ['去登陆','取消']//按钮
   	    	}, function(){
   	    	  window.location.href="user";
   	    	});
   	    	},2000)
   	      }
	
       /* $("form").validate({
   		         //做完表单验证后的  ajax后台数据验证 如果不满足条件 则禁止表单的提交
   			  submitHandler: function(form) {
   			    return checkinfo();
   			     //发出ajax请求 根据回调函数的返回值 来判断checkBackitemExsit()的返回值;
   			    	
   			    }  
   	 });  */

    
                   //非空检测
					function check_null(obj) {
						var s = $(obj).val();
						if (s != null && s != "") {
							$(obj).css("border", "1px solid #ddd");
						} else {

							$(obj).css("border", "1px solid red");
						}
					}
                      //手机号验证
					function checkphone() {
						var re = /^1[3|5|6|7|8|]\d{9}$/;//正则表达式
						var s = $("#phone").val();
						if (s != null && re.test(s)) {
							$("#phone").css("border", "1px solid #ddd");
						} else {
							$("#phone").css("border", "1px solid red");
						}

					}

					function checkinfo() {
						//验证手机号的正则
					    var re = /^1[3|5|6|7|8|]\d{9}$/;
						var text = $(".text1").val().trim();
						var comname = $("#company").val().trim();
						var clientname = $("#clientname").val().trim();
						var phone = $("#phone").val().trim();
						var flag1 = false;
						var flag2 = false;
						var flag3 = false;
						var flag4 = false;
						
						if (text!= null && text != "") {
							flag1 = true;
						} else {
							$(".text1").css("border", "1px solid red");
						}
						if (comname != null && comname != "") {
							flag2 = true;
						} else {
							$("#company").css("border", "1px solid red");

						}
						if (clientname!= null && clientname!="") {
							flag3 = true;
						} else {
							$("#clientname").css("border", "1px solid red");
						}
						if (phone != ""&&(re.test(phone))) {
							flag4 = true;
						} else {
							$("#phone").css("border", "1px solid red");
						} 
                 var flag = flag1&&flag2&&flag3&& flag4;
						return flag;
					}
				</script>
</body>
</html>
